package com.sgl.retrofitdemo.net.api;

import com.alibaba.fastjson.annotation.JSONField;
import com.sgl.retrofitdemo.net.ApiConst;
import com.sgl.retrofitdemo.net.ApiResponse;
import com.sgl.retrofitdemo.net.BaseResponse;
import com.sgl.retrofitdemo.net.entity.request.UserInfo;
import com.sgl.retrofitdemo.net.entity.respons.UserInfoEntity;

import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by sunqiyong on 2016/11/13.
 */

public interface UserApi {
    /**
     *测试post
     */
    @POST(ApiConst.TEST_POST)
    Observable<ApiResponse<UserInfoEntity>> testPost(@Body UserInfo userInfo);

    /**
     *测试get
     */
    @GET(ApiConst.TEST_GET)
    Observable<ApiResponse<UserInfoEntity>> testGet(@Query("count") String count,
                                                    @Query("password") String password);
}
